/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package model;

/**
 *
 * @author Jerry
 */
public class Transpose {
    
    public int [][] transpose(int [][] matrix){
        
        int rows = matrix.length;
        int columns = matrix[0].length;
        
      int transpose[][] = new int[columns][rows];
 
      for ( int i = 0 ; i < rows ; i++ )
      {
         for ( int j = 0 ; j < columns ; j++ )               
            transpose[j][i] = matrix[i][j];
      }
        return transpose;
    }
    
    
}
